package com.heart.sell.service.impl;

import com.heart.sell.dao.ProductCategoryMapper;
import com.heart.sell.pojo.ProductCategory;
import com.heart.sell.service.ProductCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 默认商品详情实现
 *
 * @author Luo Zhen
 * @create 2019-04-22 16:01
 */
@Service
public class DefaultProductCategoryServiceImpl implements ProductCategoryService {

    @Autowired
    private ProductCategoryMapper productCategoryMapper;

    @Override
    public ProductCategory findOne(Integer categoryId) {
        return productCategoryMapper.findOne(categoryId);
    }

    @Override
    public List<ProductCategory> findAll() {
        return productCategoryMapper.findAll();
    }

    @Override
    public List<ProductCategory> findByCategoryTypeIn(List<Integer> categorys) {
        return productCategoryMapper.findByCategoryTypeIn(categorys);
    }

    @Override
    public ProductCategory save(ProductCategory productCategory) {
        return productCategoryMapper.save(productCategory);
    }
}
